negotiator.utility
Interface Evaluator

All Known Implementing Classes:
EvaluatorDiscrete, EvaluatorInteger

public interface Evaluator

Evaluator is an object that translates discrete values into an evaluation value. The UtilitySpace attaches it to an issue.

Author:
Dmytro

Method Summary
 Evaluator clone()
           
 java.lang.Double getEvaluation(UtilitySpace uspace, Bid bid, int index)
          This method returns the utility of the value of an issue.
 EVALUATORTYPE getType()
           
 double getWeight()
           
 java.lang.String isComplete(Objective whichObjective)
          Check whether the evaluator has enough information to make an evaluation.
 void loadFromXML(negotiator.xml.SimpleElement pRoot)
          Method to
 void lockWeight()
          Wouter: lockWeight does not actually lock setWeight or so.
 void setWeight(double wt)
          Sets the weigth with which an Objective or Issue is evaluated.
 void unlockWeight()
          Method to unlock a weight.
 boolean weightLocked()
           
 

Method Detail

getWeight

double getWeight()
Returns:
the weight associated with this

setWeight

void setWeight(double wt)
Sets the weigth with which an Objective or Issue is evaluated.

Parameters:
wt - The new weight.

lockWeight

void lockWeight()
Wouter: lockWeight does not actually lock setWeight or so. It merely is a flag affecting the behaviour of the normalize function in the utility space.


unlockWeight

void unlockWeight()
Method to unlock a weight. A weight must be unlocked to modify it.


weightLocked

boolean weightLocked()
Returns:
true if weight is locked.

getEvaluation

java.lang.Double getEvaluation(UtilitySpace uspace,
                               Bid bid,
                               int index)
                               throws java.lang.Exception
This method returns the utility of the value of an issue. Note that the value is not multiplied by the issue weight, and is therefore non-normalized.

Parameters:
uspace - preference profile
bid - in which the value is contained.
index - of the issue in the bid.
Returns:
utility of the value for an issue, not normalized by the issue weight.
Throws:
java.lang.Exception - if problem, for instance illegal evaluation values.

getType

EVALUATORTYPE getType()
Returns:
type of evaluation function, for example EVALUATORTYPE.LINEAR.

loadFromXML

void loadFromXML(negotiator.xml.SimpleElement pRoot)
Method to

Parameters:
pRoot -

isComplete

java.lang.String isComplete(Objective whichObjective)
Check whether the evaluator has enough information to make an evaluation.

Parameters:
whichObjective - is the objective/issue to which this evaluator is attached.
Returns:
String describing lacking component, or null if the evaluator is complete.

clone

Evaluator clone()
Returns:
clone of the current object.